< previous page page_520 next page >

Page 520
12181-0520a.gif
Figure 18.15.
Entering standard Visual Basic code in the Immediate window.
When you press Enter, Visual Basic actually switches to Run mode to execute the statement, and then returns to Break mode. At that point, you can see the results of the procedure call and test any possible effects it might have had on the variable or properties.
Caution
If you have Option Explicit specified, any variable that you enter in the Immediate window must have been previously defined in the application.

You can also use the Immediate window to display any error message using its related error number. Put the Address Book application in Break mode and then enter the following line of code in the Immediate window:
error 76
When you press Enter, this statement will produce a standard MsgBox with the related error message, as shown in Figure 18.16.
12181-0520b.gif
Figure 18.16.
Displaying error messages directly from the Immediate window.

 
< previous page page_520 next page >

If you like this book, buy it!